<template>
  <div class="page bgc-fff">
    <x-header title="公司信息"></x-header>
    <!-- main -->
    <div class="mt46">
      <div class="pad-l-r15 pad-t20 c-333 f16">
        <span v-if="companyInfoData.name">{{companyInfoData.name}}</span>
        <span v-else>暂无</span>
      </div>
      <div class="pad-l-r20 pad-t-b20 f14 c-333">
        <div class="flex l-center a-between mt20">
          <div>
            <span class="c-999">纳税人识别码：</span>
            <span v-if="companyInfoData.creditno">{{companyInfoData.creditno}}</span>
            <span v-else>暂无</span>
          </div>
        </div>
        <div class="flex l-center a-between mt20">
          <div class="flex l-start a-left">
            <span class="c-999 ta-l" style="width:.9rem;">注册地址：</span>
            <span class="ta-l" v-if="companyInfoData.registrySite">{{companyInfoData.registrySite}}</span>
            <span v-else>暂无</span>
          </div>
        </div>
        <div class="flex l-center a-between mt20">
          <div>
            <span class="c-999">法人：</span>
            <span v-if="companyInfoData.legalRep">{{companyInfoData.legalRep}}</span>
            <span v-else>暂无</span>
          </div>
        </div>
        <div class="flex l-center a-between mt20">
          <div>
            <span class="c-999">法人电话：</span>
            <span v-if="companyInfoData.repMobile">{{companyInfoData.repMobile}}</span>
            <span v-else>暂无</span>
          </div>
        </div>
        <div class="flex l-center a-between mt20">
          <div>
            <span class="c-999">办公地址：</span>
            <span v-if="companyInfoData.workingSite">{{companyInfoData.workingSite}}</span>
            <span v-else>暂无</span>
          </div>
        </div>
        <div class="flex l-center a-between mt20">
          <div>
            <span class="c-999">创办日期：</span>
            <span v-if="companyInfoData.gmtCreate">{{companyInfoData.gmtCreate| parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
            <span v-else>暂无</span>
          </div>
        </div>
      </div>
      <!-- <div class="pad15">
        <div class="flex l-center a-between">
          <div>
            <span class="c-999">当前可用司机：</span><span></span>
          </div>
        </div>
        <div class="flex l-center a-between">
          <div>
            <span class="c-999">当前可用牵引车：</span><span></span>
          </div>
        </div>
        <div class="flex l-center a-between">
          <div>
            <span class="c-999">当前可用挂车：</span><span></span>
          </div>
        </div>
      </div> -->
    </div>
    <!-- loading -->
    <v-loading v-show="loadingShow"></v-loading>
  </div>
</template>

<script type="text/ecmascript-6">
  import { XHeader } from 'vux'
  import * as TenantApi from '@/api/tenant'
  import Loading from '@/components/common/loading/loading'
  export default {
    name: 'me-driverCompanyProfile',
    data() {
      return {
        companyInfoData: {
          authStatus: '', //  认证状态：0-未认证;1-已认证
          businessSite: '', // 业务覆盖城市，取城市。多个用分号分割
          code: '', //
          createFrom: '', // 数据来源 微信公众 or pc
          creator: '', // 创建人
          gmtCreate: '', // 注册时间
          gmtUpdate: '', //
          id: '', //
          isDelete: '', //
          legalRep: '', // 法人姓名
          name: '', // 全称
          nameAbbr: '', // 简称
          registryCapital: '', // 注册资本
          registrySite: '', // 注册地址
          remark: '', // 备注
          repMobile: '', // 法人电话
          serviceType: '', // 服务类型（多个用分号隔开）
          status: '', // 业务状态：0-停用;1-启用
          tenantId: '', //
          workingSite: '', // 办公地点,
          creditno: '' // 纳锐人识别码
        },
        loadingShow: false
      }
    },
    components: {
      XHeader,
      'v-loading': Loading
    },
    created() {
      this.getCompanyInfo()
    },
    mounted() {

    },
    methods: {
      getCompanyInfo: function() {
        this.loadingShow = true
        TenantApi.getLspByTeantId().then(res => {
          this.loadingShow = false
          if (res.code === 0) {
            this.companyInfoData = res.data
          }
        }).catch(res => {
          this.loadingShow = false
          console.warn('error', res)
        })
      }
    }
  }
</script>

<style scoped>
  @import '../../styles/util.css';
</style>
